From 91fae406b600d270dc099e38946340bc9852e029 Mon Sep 17 00:00:00 2001 From: Luca Bruno Date: Sat, 27 Feb 2016 23:30:03 +0100 Subject: [PATCH] cargo: add a new stage2 profile --- debian/control | 5 +++-- debian/rules | 8 +++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/debian/control b/debian/control index 17c58c953..367c0be69 100644 --- a/debian/control +++ b/debian/control @@ -10,8 +10,9 @@ Build-Depends: debhelper (>= 9), pkg-config, cmake, git, - python-dulwich, - python-pytoml, + cargo (>= 0.7.0) , + python-dulwich , + python-pytoml , ca-certificates, bash-completion, libhttp-parser-dev, diff --git a/debian/rules b/debian/rules index dcc5fc5b3..24fc6bdff 100755 --- a/debian/rules +++ b/debian/rules @@ -28,6 +28,11 @@ override_dh_auto_configure: ./debian/cargo-vendor-pack.py override_dh_auto_build: +ifneq ($(filter stage2,$(DEB_BUILD_PROFILES)),) + ln -s `which cargo` $(CURDIR)/cargo-stage0 + # Workaround for https://github.com/rust-lang/cargo/issues/1423 + mv $(DEPSDIR) $(CURDIR)/.deps +else # Bootstrap cargo stage0 ./debian/bootstrap.py \ --no-clean \ @@ -40,7 +45,8 @@ override_dh_auto_build: --target=$(DEB_TARGET_RUST_TYPE) # Workaround for https://github.com/rust-lang/cargo/issues/1423 mv $(DEPSDIR) $(CURDIR)/.deps - ln -s `find $(CURDIR)/.deps -name 'cargo-*' -type f -executable` $(CURDIR)/cargo-stage0 + ln -s `find $(CURDIR)/.deps -name 'cargo-*' -type f -executable` $(CURDIR)/cargo-stage0 +endif # Configure to build cargo using the just-built stage0 ./configure \ --prefix=/usr \ -- 2.30.2